package com.jie.day2.able2;


import com.jie.day2.able2.abs.Human2;
import com.jie.day2.able2.factory.FemaleHumanFactory;
import com.jie.day2.able2.factory.HumanFactory;
import com.jie.day2.able2.factory.MaleHumanFactory;

/**
 * 女娲建立起了两条生产线，分别是：
 * 男性生产线
 * 女性生产线
 *
 * @author jie
 * @date 2019/11/6 -15:44
 */
public class NvWa {
    public static void main(String[] args) {
        //第一条生产线，男性生产线
        HumanFactory maleHumanFactory = new MaleHumanFactory();

        //第二条生产线，女性生产线
        HumanFactory femaleHumanFactory = new FemaleHumanFactory();

        //生产线建立完毕，开始生产人
        Human2 maleYellowHuman = maleHumanFactory.createYellowHuman();

        Human2 femaleYellowHuman = femaleHumanFactory.createYellowHuman();

        maleYellowHuman.cry();
        maleYellowHuman.laugh();
        femaleYellowHuman.sex();
    }
}
